package codeforces13;

import java.util.Scanner;

/**
 * Codeforces 13. Problem A
 * 
 * @author Aleksandr Nikiforov
 */
public class ProblemA {

	public static void main(String[] args) {
		ProblemA problem = new ProblemA();
		problem.solve();
	}

	private void solve() {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int total = 0;
		for (int base = 2; base < a; base++) {
			total += digitSum(a, base);
		}
		int d = gcd(total, a - 2);
		total /= d;
		System.out.println(total + "/" + (a - 2) / d);
	}

	private int gcd(int a, int b) {
		if (b == 0) {
			return a;
		}
		return gcd(b, a % b);
	}

	private int digitSum(int n, int base) {
		int ret = 0;
		while (n != 0) {
			ret += (n % base);
			n /= base;
		}
		return ret;
	}

}
